import { createApp } from 'vue';
import { createPinia } from 'pinia';
import App from './App';
import Varlet from '@varlet/ui';
import Vant from 'vant';
import { initFlexible } from './utils/flexible';
import '@varlet/ui/es/style.css';
import 'vant/lib/index.css';
import './styles/tailwind.css';
import './styles/global.css';
import 'reflect-metadata';
import { envConfig } from './utils/env';

// 初始化移动端适配
initFlexible();

// 设置标题
document.title = envConfig.title;

const app = createApp(App);

app.use(createPinia());

// 在创建路由之前初始化 store
import router from './router';
app.use(router);
app.use(Varlet);
app.use(Vant);

app.mount('#app');